tests: Modernize valgrind infrastructure
authorColin Walters <walters@verbum.org>
Wed, 11 May 2016 19:54:48 +0000 (15:54 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 9 Jun 2016 21:10:35 +0000 (21:10 +0000)
commit70af1d26b1de686373733f02c4c01151910619e9
treee636dc1a6046731389cdbd547fcc8faf5d0d7a9f
parentc015fe13fb5e887a6aa62a3a2830affb6fe17e50
tests: Modernize valgrind infrastructure

The recent memleak fixes motivated me to look at the bitrotted code to
run invocations of `ostree` in the test suite underneath valgrind.

There are a few things here.  First, update suppressions file from
libhif, since I recently worked on it.

When running *uninstalled* as we now support, we need
`libtool --mode=execute` in the mix so it expands out to
the uninstalled binary and we don't valgrind the intermediate shell.

However, it's harder than that because we chdir into a tmpdir,
which defeats the libtool logic.  AFAICS, the only fix for this
is to determine the realbin path before we chdir, and then unfortunately
we need to change every use of `ostree` to `${OSTREE}` =(

Then this immediately breaks for me on RHEL7 because my ancient
copy of `valgrind-3.10.0-16.el7.x86_64` is unaware of syscall 306, i.e.
`syncfs`.

But let's do this first before I dive into that.

Closes: #292
Approved by: krnowak
Makefile-tests.am
src/libostree/ostree-repo-commit.c
tests/glib.supp [new file with mode: 0644]
tests/libtest.sh
tests/ostree-valgrind.supp [deleted file]
tests/ostree.supp [new file with mode: 0644]